//
//  TeamData.m
//  Doctor1.0
//
//  Created by mk on 15/11/12.
//  Copyright (c) 2015年 cocoa-mk. All rights reserved.
//

#import "TeamData.h"

@implementation TeamInfpData


#pragma mark 设置DATA
-(void)parseData:(id)dataObj
{
    [super parseData:dataObj];
    
    if ([dataObj isKindOfClass:[NSDictionary class]])
    {
        self.teamID =  NullObjToString(dataObj[@"id"]);
        self.name = NullObjToString(dataObj[@"name"]);
        self.hospital = NullObjToString(dataObj[@"hospital"]);
        self.hpDept = NullObjToString(dataObj[@"hpDept"]);
        self.slogan = NullObjToString(dataObj[@"slogan"]);
        self.actionUrl = NullObjToString(dataObj[@"actionUrl"]);
        self.desc = NullObjToString(dataObj[@"desc"]);
        self.imageUrl = NullObjToString(dataObj[@"imageUrl"]);
        self.hpName = NullObjToString(dataObj[@"hpName"]);
    }
    
    
}
@end


@implementation TeamListData

-(id)init
{
    if (self = [super init])
    {
        self.urlPath = @"";
    }
    return self;
}

-(void)parseData:(id)dataObj
{
    [super parseData:dataObj];
    
    if ([dataObj isKindOfClass:[NSArray class]])
    {
        for (int i = 0; i < [dataObj count]; i++) {
            NSDictionary *dicRec = [dataObj objectAtIndex:i];
            TeamInfpData *recData = [[TeamInfpData alloc] init];
            [recData parseData:dicRec];
            [self.dataArray addObject:recData];
        }
    }
}


@end


